import VueParticles from 'vue-particles'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import App from './App'
import api from './api';
import router from './routes'

Vue.use(VueParticles);
Vue.use(ELEMENT);
Vue.use(VueRouter);
Vue.use(api);
NProgress.inc(0.2);
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false });

router.beforeEach((to,from,next) => {
    NProgress.start();
    next()
});

router.afterEach(() => {
    NProgress.done()
});
new Vue({
  router,
  render: h => h(App)
}).$mount('#app');

